import java.net.*;
import java.io.*;

public class URLConnectionReader {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		String str = "http://rocksvv.cs.uit.no:9909/?servernumber=";
		int serverNum = 1;
		String clientHostname = "tile-1-1";
		str = str + serverNum + "client=" + clientHostname;
		URL yahoo = new URL(str);
        URLConnection yc = yahoo.openConnection();
        BufferedReader in = new BufferedReader(
                                new InputStreamReader(
                                yc.getInputStream()));
        String inputLine;

        while ((inputLine = in.readLine()) != null) 
            System.out.println(inputLine);
        in.close();

	}

}
